/**
 * @license
 * Copyright 2016 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

html, body {
  height: 100%;
  min-height: 375px;
}

body {
  background-color: #fff;
  font-family: sans-serif;
  margin: 0 5px;
  overflow: hidden;
}

h1 {
  font-weight: normal;
  font-size: 140%;
}

h3 {
  margin-top: 5px;
  margin-bottom: 0;
}

table {
  border: none;
  border-collapse: collapse;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

td {
  vertical-align: top;
  padding: 0;
}

p {
  display: block;
  -webkit-margin-before: 0;
  -webkit-margin-after: 0;
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
  padding: 5px 0;
}

#factoryHeader {
  display: table;
  height: 10%;
}

#blockly {
  position: absolute;
}

#blocklyMask {
  background-color: #000;
  cursor: not-allowed;
  display: none;
  position: fixed;
  opacity: 0.2;
  z-index: 9;
}

#preview {
  position: absolute;
}

pre,
#languageTA {
  border: #ddd 1px solid;
  margin-top: 0;
  position: absolute;
  overflow: scroll;
}

#languageTA {
  display: none;
  font: 10pt monospace;
}

.downloadButton {
  padding: 5px;
}

.disabled {
  color: #888;
}

button:disabled, .buttonStyle:disabled {
  opacity: 0.6;
}

button>*, .buttonStyle>* {
  opacity: 1;
  vertical-align: text-bottom;
}

button, .buttonStyle {
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: #eee;
  color: #000;
  padding: 10px;
  margin: 10px 5px;
  font-size: small;
}

.buttonStyle:hover:not(:disabled), button:hover:not(:disabled) {
  box-shadow: 2px 2px 5px #888;
}

.buttonStyle:hover:not(:disabled)>*, button:hover:not(:disabled)>* {
  opacity: 1;
}

#linkButton {
  display: none;
}

#helpButton {
  float: right;
}

#blockFactoryContent {
  height: 85%;
  width: 100%;
  overflow: hidden;
}

#blockFactoryPreview {
  height: 100%;
  width: 100%;
}

#blockLibraryContainer {
  vertical-align: bottom;
}

#blockLibraryControls {
  text-align: right;
  vertical-align: middle;
}

#previewContainer {
  vertical-align: bottom;
}

#buttonContainer {
  text-align: right;
  vertical-align: middle;
}

#files {
  position: absolute;
  visibility: hidden;
}

.toolbox {
  display: none;
}

#blocklyWorkspaceContainer {
  width: 50%;
}

#workspaceFactoryContent {
  clear: both;
  display: none;
  height: 90%;
  overflow-x: hidden;
  overflow-y: scroll;
}

/* Exporter */

#blockLibraryExporter {
  clear: both;
  display: none;
  height: 90%;
  overflow-x: hidden;
  overflow-y: scroll;
}

#exportSelector {
  display: inline-block;
  float: left;
  height: 70%;
  width: 30%;
}

#exportSettings {
  float: left;
  overflow: hidden;
  padding-left: 16px;
  width: 20%;
}

#selectedBlocksTextContainer {
  max-height: 200px;
  overflow-y: scroll;
  padding-bottom: 2em;
}

::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 7px;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: #ccc;
  -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

.subsettings {
  margin: 0 25px;
}

#exporterHiddenWorkspace {
 display: none;
}

#exportPreview {
  float: right;
  height: 90%;
  overflow: hidden;
  width: 45%;
}

.exportPreviewTextArea {
  display: block;
  float: right;
  height: 40%;
  width: 100%;
}

#genStubs_textArea, #blockDefs_textArea {
  display: block;
  height: 80%;
  margin-right: 20px;
  max-height: 300px;
  overflow: scroll;
  position: static;
}

#blockDefs_label, #genStubs_label {
  display: block;
}

#blockSelector {
  background-color: #eee;
  border: 1px solid lightgrey;
  width: 80%;
  height: 90%;
  overflow-y: scroll;
  position: relative;
}

/* Exporter Block Option */

.blockOption {
  background-color: #eee;
  padding: 0px 20px;
  width: 95%;
}

.blockOption_check_label {
  position: relative;
}

.blockOption_check {
  float: left;
  display:inline;
  padding: 4px;
}

.blockOption_label {
  display:inline;
  max-width: inherit;
  word-wrap: break-word;
}

.blockOption_preview {
  height: 100px;
  padding-top: 10px;
  width: 90%;
}

/* Block Library */

#dropdownDiv_blockLib {
  max-height: 65%;
  overflow-y: scroll;
}

#button_blockLib {
  border-color: darkgrey;
  font-size: large;
}

.button_alert {
  background-color: #fcc;
  border-color: #f99;
}

.button_warn {
  background-color: #aea;
  border-color: #5d5;
}

/* Tabs */

.tab {
  float: left;
  padding: 5px 19px;
}

.tab:hover:not(.tabon) {
  background-color: #e8e8e8;
}

.tab.tabon {
  background-color: #ccc;
}

.tab.taboff {
  cursor: pointer;
}

#tabContainer {
  background-color: #f8f8f8;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  display: table;
  width: 100%;
}

/* Workspace Factory */

section {
  float: left;
}

aside {
  float: right;
}

#categoryTable>table {
  border: 1px solid #ccc;
  border-bottom: none;
  width: auto;
}

td.tabon {
  background-color: #ccc;
  border-bottom-color: #ccc;
  padding: 5px 19px;
}

td.taboff {
  cursor: pointer;
  padding: 5px 19px;
}

td.taboff:hover {
  background-color: #eee;
}

.large {
  font-size: large;
}

.inputfile {
  height: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
  z-index: -1;
}
#wfactoryHeader {
  height: 29%;
  padding: 0.5%;
}

#workspaceTabs {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  display: table;
  width: auto;
}

#toolbox_section {
  height: 85%;
  width: 60%;
}

#previewHelp {
  padding: 10px;
  width: 98%;
}

#toolbox_blocks {
  height: 100%;
  width: 100%;
}

#preview_blocks {
  height: 80%;
  padding: 10px;
  width: 100%;
}

#createDiv {
  height: 79%;
  padding: 0.5%;
  width: 60%;
}

#previewDiv {
  border: 10px solid #eee;
  height: 77%;
  margin-right: 0.5%;
  padding-bottom: 10px;
  width: 35%;
}

#previewBorder {
  border: 5px solid #ddd;
  height: 100%;
  padding-right: 20px;
}

.disabled {
  background-color: white;
  opacity: 0.5;
}

#toolbox_div {
  display: table;
  height: auto;
  margin-right: 5%;
  overflow: hidden;
  width: 35%;
}

#preload_div {
  display: table;
  height: 75%;
  margin-left: 2%;
  margin-right: 2%;
  max-height: 500px;
  overflow: hidden;
  overflow-y: scroll;
  width: 30%;
}

#shadowBlockDropdown {
  height: 15%;
}

#preloadHelp {
  display: table-row;
  height: 30%;
}

#workspace_options {
  display: table-row;
  margin-top: 2%;
}

#disable_div {
  background-color: white;
  height: 100%;
  left: 0;
  opacity: .5;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;  /* Start behind workspace */
}

#grid_options, #zoom_options, #maxBlockNumber_option {
  padding-left: 15px;
}

#modalShadow {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 100;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
  display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
  background-color: #fff;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,.2);
  display: none;
  min-width: 170px;
  opacity: 1;
  position: absolute;
  z-index: 101;  /* On top of the modal Shadow. */
}

/* Links inside the dropdown */
.dropdown-content a, .dropdown-content label {
  color: black;
  display: block;
  font-size: small;
  padding: 12px 16px;
  text-decoration: none;
}

/* Change color  of dropdown links on hover. */
.dropdown-content a:hover, .dropdown-content label:hover {
  background-color: #EEE;
}

/* Change color of dropdown links on selected. */
.dropdown-content-selected {
  background-color: #DDD;
}

/* Show the dropdown menu */
.show {
  display: block;
}

#dropdownDiv_editCategory {
  padding: 0 1ex;
}

#dropdownDiv_editCategory>img {
  vertical-align: middle;
}

.cp_swatch {
  vertical-align: middle !important;
}

#cp_popup {
 z-index: 999;
}

.shadowBlock>.blocklyPath {
  fill-opacity: .5;
  stroke-opacity: .5;
}

.shadowBlock>.blocklyPathLight,
.shadowBlock>.blocklyPathDark {
  display: none;
}

/* Privacy link */
.privacyLink {
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: small;
  text-decoration: none;
}

.privacyButton {
  float: right;
}
